/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.opgea.qms.domain.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Ramesh
 */
@Entity
@Table(name = "smsserver_out")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "SmsServerOut.findAll", query = "SELECT s FROM SmsServerOut s"),
    @NamedQuery(name = "SmsServerOut.findById", query = "SELECT s FROM SmsServerOut s WHERE s.id = :id"),
    @NamedQuery(name = "SmsServerOut.findByType", query = "SELECT s FROM SmsServerOut s WHERE s.type = :type"),
    @NamedQuery(name = "SmsServerOut.findByRecipient", query = "SELECT s FROM SmsServerOut s WHERE s.recipient = :recipient"),
    @NamedQuery(name = "SmsServerOut.findByText", query = "SELECT s FROM SmsServerOut s WHERE s.text = :text"),
    @NamedQuery(name = "SmsServerOut.findByWapUrl", query = "SELECT s FROM SmsServerOut s WHERE s.wapUrl = :wapUrl"),
    @NamedQuery(name = "SmsServerOut.findByWapExpiryDate", query = "SELECT s FROM SmsServerOut s WHERE s.wapExpiryDate = :wapExpiryDate"),
    @NamedQuery(name = "SmsServerOut.findByWapSignal", query = "SELECT s FROM SmsServerOut s WHERE s.wapSignal = :wapSignal"),
    @NamedQuery(name = "SmsServerOut.findByCreateDate", query = "SELECT s FROM SmsServerOut s WHERE s.createDate = :createDate"),
    @NamedQuery(name = "SmsServerOut.findByOriginator", query = "SELECT s FROM SmsServerOut s WHERE s.originator = :originator"),
    @NamedQuery(name = "SmsServerOut.findByEncoding", query = "SELECT s FROM SmsServerOut s WHERE s.encoding = :encoding"),
    @NamedQuery(name = "SmsServerOut.findByStatusReport", query = "SELECT s FROM SmsServerOut s WHERE s.statusReport = :statusReport"),
    @NamedQuery(name = "SmsServerOut.findByFlashSms", query = "SELECT s FROM SmsServerOut s WHERE s.flashSms = :flashSms"),
    @NamedQuery(name = "SmsServerOut.findBySrcPort", query = "SELECT s FROM SmsServerOut s WHERE s.srcPort = :srcPort"),
    @NamedQuery(name = "SmsServerOut.findByDstPort", query = "SELECT s FROM SmsServerOut s WHERE s.dstPort = :dstPort"),
    @NamedQuery(name = "SmsServerOut.findBySentDate", query = "SELECT s FROM SmsServerOut s WHERE s.sentDate = :sentDate"),
    @NamedQuery(name = "SmsServerOut.findByRefNo", query = "SELECT s FROM SmsServerOut s WHERE s.refNo = :refNo"),
    @NamedQuery(name = "SmsServerOut.findByPriority", query = "SELECT s FROM SmsServerOut s WHERE s.priority = :priority"),
    @NamedQuery(name = "SmsServerOut.findByStatus", query = "SELECT s FROM SmsServerOut s WHERE s.status = :status"),
    @NamedQuery(name = "SmsServerOut.findByErrors", query = "SELECT s FROM SmsServerOut s WHERE s.errors = :errors"),
    @NamedQuery(name = "SmsServerOut.findByGatewayId", query = "SELECT s FROM SmsServerOut s WHERE s.gatewayId = :gatewayId")})
public class SmsServerOut implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "type")
    private String type;
    @Basic(optional = false)
    @Column(name = "recipient")
    private String recipient;
    @Basic(optional = false)
    @Column(name = "text")
    private String text;
    @Column(name = "wap_url")
    private String wapUrl;
    @Column(name = "wap_expiry_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date wapExpiryDate;
    @Column(name = "wap_signal")
    private String wapSignal;
    @Basic(optional = false)
    @Column(name = "create_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;
    @Basic(optional = false)
    @Column(name = "originator")
    private String originator;
    @Basic(optional = false)
    @Column(name = "encoding")
    private String encoding;
    @Basic(optional = false)
    @Column(name = "status_report")
    private int statusReport;
    @Basic(optional = false)
    @Column(name = "flash_sms")
    private int flashSms;
    @Basic(optional = false)
    @Column(name = "src_port")
    private int srcPort;
    @Basic(optional = false)
    @Column(name = "dst_port")
    private int dstPort;
    @Column(name = "sent_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date sentDate;
    @Column(name = "ref_no")
    private String refNo;
    @Basic(optional = false)
    @Column(name = "priority")
    private int priority;
    @Basic(optional = false)
    @Column(name = "status")
    private String status;
    @Basic(optional = false)
    @Column(name = "errors")
    private int errors;
    @Basic(optional = false)
    @Column(name = "gateway_id")
    private String gatewayId;

    public SmsServerOut() {
    }

    public SmsServerOut(Integer id) {
        this.id = id;
    }

    public SmsServerOut(Integer id, String type, String recipient, String text, Date createDate, String originator, String encoding, int statusReport, int flashSms, int srcPort, int dstPort, int priority, String status, int errors, String gatewayId) {
        this.id = id;
        this.type = type;
        this.recipient = recipient;
        this.text = text;
        this.createDate = createDate;
        this.originator = originator;
        this.encoding = encoding;
        this.statusReport = statusReport;
        this.flashSms = flashSms;
        this.srcPort = srcPort;
        this.dstPort = dstPort;
        this.priority = priority;
        this.status = status;
        this.errors = errors;
        this.gatewayId = gatewayId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getRecipient() {
        return recipient;
    }

    public void setRecipient(String recipient) {
        this.recipient = recipient;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getWapUrl() {
        return wapUrl;
    }

    public void setWapUrl(String wapUrl) {
        this.wapUrl = wapUrl;
    }

    public Date getWapExpiryDate() {
        return wapExpiryDate;
    }

    public void setWapExpiryDate(Date wapExpiryDate) {
        this.wapExpiryDate = wapExpiryDate;
    }

    public String getWapSignal() {
        return wapSignal;
    }

    public void setWapSignal(String wapSignal) {
        this.wapSignal = wapSignal;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getOriginator() {
        return originator;
    }

    public void setOriginator(String originator) {
        this.originator = originator;
    }

    public String getEncoding() {
        return encoding;
    }

    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    public int getStatusReport() {
        return statusReport;
    }

    public void setStatusReport(int statusReport) {
        this.statusReport = statusReport;
    }

    public int getFlashSms() {
        return flashSms;
    }

    public void setFlashSms(int flashSms) {
        this.flashSms = flashSms;
    }

    public int getSrcPort() {
        return srcPort;
    }

    public void setSrcPort(int srcPort) {
        this.srcPort = srcPort;
    }

    public int getDstPort() {
        return dstPort;
    }

    public void setDstPort(int dstPort) {
        this.dstPort = dstPort;
    }

    public Date getSentDate() {
        return sentDate;
    }

    public void setSentDate(Date sentDate) {
        this.sentDate = sentDate;
    }

    public String getRefNo() {
        return refNo;
    }

    public void setRefNo(String refNo) {
        this.refNo = refNo;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public int getErrors() {
        return errors;
    }

    public void setErrors(int errors) {
        this.errors = errors;
    }

    public String getGatewayId() {
        return gatewayId;
    }

    public void setGatewayId(String gatewayId) {
        this.gatewayId = gatewayId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SmsServerOut)) {
            return false;
        }
        SmsServerOut other = (SmsServerOut) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.opgea.qms.domain.entities.generated.SmsServerOut[ id=" + id + " ]";
    }
    
}
